package com.shy.springframework.beans.factory.config;

import com.shy.springframework.beans.BeansException;

/**
 * @author yzpang
 * @desc: 扩展接口-实例化后触发
 * @date: 2023/2/8 11:27
 */
public interface BeanPostProcessor {

    /**
     * bean对象执行初始化之前,执行此方法
     * @param bean
     * @param beanName
     * @throws BeansException
     */
    Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException;

    /**
     * bean对象执行初始化方法之后执行此方法
     * @param bean
     * @param beanName
     * @throws BeansException
     */
    Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException;
}
